import React, {Component} from "react";
import Row from "./Row";

//棋盘组件
export default class Checkerboard extends Component {



    playChess(row,col){
        this.props.playChess(row,col)
    }

    render() {
        const {boardData} =this.props
        return (
            <div>
                {
                    boardData.map((item,index) => (
                        <Row rowData={item} key={index} row={index} playChess={this.playChess.bind(this)}/>
                    ))
                }
            </div>
        )
    }
}
